<template>
<div>
   <ProForm ref="dialogForm" :config="addeditConfig" :echo="echo"></ProForm>
             <!-- <el-button>取消</el-button>
          <el-button type="primary" @click="confirm" color="#081F42">
            確定
          </el-button> -->
</div>
</template>

<script setup>
import { ref ,watch} from 'vue' 
import {addeditConfig} from './formConfig'
const props = defineProps({
  echo:Object,
  school:Object
})
			addeditConfig.formItems.find((e) => e.props.label =='學校').options = props.school
      console.log( props.school);

watch(()=>props.school,(newval)=>{
	addeditConfig.formItems.find((e) => e.props.label =='學校').options =newval
  console.log(newval);
  console.log(addeditConfig.formItems);
})

const dialogForm = ref(null);
const DialogCofirm = (cb) => {
  dialogForm.value.submit((e) => {
        cb(e);
  });
};
defineExpose({
    DialogCofirm
})

</script>

<style lang='less'  scoped>

</style>